package graph;


import stock.Sale;

import java.awt.*;
import java.util.*;


public class Options {
	
	// Margin for the diagram.
	public static final int marginLeft = 70;
	public static final int marginTop = 70;
	public static final int marginBottom = 35;
	public static final int marginRight = 70;
	
	
	//Margin for the arrows.
	public static final int marginArrow = 5;
	
	//Margin for the text on X and Y.
	public static final int marginYNameX = 3;
	public static final int marginYNameY = 3;
	public static final int marginXNameX = 3;
	public static final int marginXNameY = 3;
	
	//Margin from arrow to lines on diagram.
	public static final int marginFromArrow = 15;
	
	//The windows width and height.
	public static int width;
	public static int height;
	
	
	
	
	
	//The total size of X and Y for input. Based on window size, in int. not in millis!!!!
	public int xSizeInterval;
	public int ySizeInterval;
	
	

	
	
	
	//Margin for the values on y axes.
	public static final int marginValueY = 50;
	
	//Length of the lines for the values.
	public static final int lengthValueLine = 5;
	
	//Margin from the diagram to the values on axes.
	public static final int marginValueText = 5;
	
	// The dotSize.
	public static final int dotSize = 2;
	
	
	
	
	
	
	//StartXinDate
	public Calendar startDate;
	
	//EndXinDate
	public Calendar endDate;
	
	//Interval in millis!!
	public double intervalInMillis;
	

	
	
	
        
	
	//Highest and lowest amount.
	public long highestAmount;
	public long lowestAmount = Long.MAX_VALUE;
	
	//Highest and lowest rate.
	public double yMax;
	public double yMin = Double.MAX_VALUE;
	
	public double lowestRate = Double.MAX_VALUE;
	
	//
	public double highestRate;
	
	
	public long latestTime;
    public Sale lastSale;
	
	public static final Color axesColor = Color.GREEN;
        
	public int nbrOfWeekEnds;
	public int nbrOfDays;
	
	public Circle lastCircle;
	public boolean highestLowestEnd = false;
	public static final int maxDotSize = 12;
	public static final int marginLatestBuyTime = 130;
	public static final int timeTextSize = 9;
	public static final int valueTextSize = 10;
	public static final int graphNameTextSize = 25;
	public static final int marginGraphName = 40;
	public static final int standardTextSize = 10;
	public static final long monthIntervall = 33;
	public TrippleDot lastDay; 
	public Dot lastDayDot;
	public boolean largeCap;
	
	public double lowestDailyRate = Double.MAX_VALUE;
	public double highestDailyRate;
	public Map<Double, Integer> mostCommon = new HashMap<Double, Integer>();
	public ArrayList<Double> mostCommonPrice= new ArrayList<Double>();
	
	public String lastClock = "";
	public double lastHighestRate;
	public double lastLowestRate;
	public double latestDiff;
	public Color integralColor = Color.GRAY;
	public String lastDate = "";
	
	
	
       
	
	
	public Options(int width, int height){
		Options.width = width;
		Options.height = height;
		
		mostCommon.put(0.0, 0);
		xSizeInterval = width - marginRight - marginFromArrow - marginLeft;
		ySizeInterval = height - marginBottom - marginTop - marginFromArrow;
	}



	
	
	
	
}
